

/* Freescale MCU use only */
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */

#define DISABLE_INTERRUPT   DisableInterrupts
#define ENABLE_INTERRUPT    EnableInterrupts

#define LOCK_INTERRUPT      __asm TPA;__asm PSHA;DISABLE_INTERRUPT;
#define UNLOCK_INTERRUPT    __asm PULA;__asm TAP;

#define RESET_WATCHDOG       __RESET_WATCHDOG()

#define CORE_TIMER_VAL      TPM2CNT
#define CORE_TIMER_MOD      TPM2MOD  // count value for 1us 
#define CORE_TIMER_10MS     6250  // count value for 1us 
#define CORE_TIMER_START    TPM2SC_CLKSx = 1
#define CORE_TIMER_STOP     TPM2SC_CLKSx = 0

#define _BYTE_ORDER_ _BIG_ENDIAN_
/**************************/

#define TIME_TICK   10        //ms
#define USE_ROM     NO
#define MAX_INPUT_NUM        4
